﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <!--
// // -------------------------------------------------------------------------------------
// // Copyright 2012 ELEN7046 Group 2
// // 
// // Last Modified on: 2012-06-10
// // 
// // Contributors:
// // 
// // Amith Sewnarain
// // Elmar Vosloo
// // Jason Thorne
// // Satish Jewan
// // 
// // Wits University 
// // School of Electrical & Information Engineering
// // Software Engineering Tools and Techniques
// // 
// // -------------------------------------------------------------------------------------
// // 
// // This file is part of the DishDash Event Visualization System.
// // 
// // DishDash is free software: you can redistribute it and/or modify
// // it under the terms of the GNU General Public License as published by
// // the Free Software Foundation, either version 3 of the License, or
// // (at your option) any later version.
// // 
// // DishDash is distributed in the hope that it will be useful,
// // but WITHOUT ANY WARRANTY; without even the implied warranty of
// // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// // GNU General Public License for more details.
// // 
// // You should have received a copy of the GNU General Public License
// // along with DishDash.  
// // If not, see <http://www.gnu.org/licenses/>.
// // -------------------------------------------------------------------------------------
-->
    <head>
        <title></title>
        <script type="text/javascript" src="js/flotr2.min.js"> </script>
        <script type="text/javascript" src="js/jquery-1.6.2.min.js"> </script>
        <script type="text/javascript" src="services/EventFetchingClientSideService.js"> </script>
        <script type="text/javascript" src="widgets/dishdash.widget.eventcount.line.js"> </script>
    </head>
    <body>
        <div id="testGraph" style="width: 400px; height: 400px" />
        <script type="blah">
        var data = { widgetName: "testwidget",
            refreshPeriod: 2,
            precision: 1,
            samplePeriod: 60,
            events: ["test1", "test2"]
        };

        timeGraph = function (targetId, widgetConfig) {
            this.renderTarget = document.getElementById(targetId);
            this.configuration = widgetConfig;
            this.graph = null;

            this.draw = function () {
                graph = Flotr.draw(this.renderTarget, [[[1, 1], [2, 2], [3, 3]]], {
                    xaxis: {
                        minorTickFreq: 4
                    },
                    grid: {
                        minorVerticalLines: true
                    }
                });
            };

        }

        var graph = new timeGraph("testGraph", data);
        graph.draw();
    </script>
        <script type="text/javascript">

            var data = {
                widgetName: "Some System Performance",
                refreshPeriod: 1,
                precision: "second",
                samplePeriod: 1,
                events: ["perfo.wert.test"]
            };

            var graph = new dishdash.graphs.timeGraph("testGraph", data);
            graph.start();
        </script>
    </body>
</html>
